package com.link2room.soundwave.entity;

import com.link2room.common.entity.BaseEntity;
import org.hibernate.annotations.DynamicInsert;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * Created by VegetaKo on 2016/9/19.
 */
@Entity
@DynamicInsert
@Table(name = "l2r_ipms2_member", catalog = "")
public class L2RIpms2Member extends BaseEntity {
    private Long hotelGroupId;
    private Long hotelId;
    private String l2RMemberNo;
    private Long memberId;
    private Long cardId;
    private String cardNo;
    private String cardType;
    private String cardLevel;
    private String sta;
    private String name;
    private String sex;
    private String mobile;
    private String birth;
    private String idType;
    private String idNo;
    private String phone;
    private String email;
    private String street;
    private String rateCode;
    private String salesCode;

    @Basic
    @Column(name = "hotel_group_id", nullable = false, length = 20)
    public Long getHotelGroupId() {
        return hotelGroupId;
    }

    public void setHotelGroupId(Long hotelGroupId) {
        this.hotelGroupId = hotelGroupId;
    }

    @Basic
    @Column(name = "hotel_id", nullable = true, length = 20)
    public Long getHotelId() {
        return hotelId;
    }

    public void setHotelId(Long hotelId) {
        this.hotelId = hotelId;
    }

    @Basic
    @Column(name = "l2r_member_no", nullable = false, length = 20)
    public String getL2RMemberNo() {
        return l2RMemberNo;
    }

    public void setL2RMemberNo(String l2RMemberNo) {
        this.l2RMemberNo = l2RMemberNo;
    }

    @Basic
    @Column(name = "member_id", nullable = false)
    public Long getMemberId() {
        return memberId;
    }

    public void setMemberId(Long memberId) {
        this.memberId = memberId;
    }

    @Basic
    @Column(name = "card_id", nullable = false)
    public Long getCardId() {
        return cardId;
    }

    public void setCardId(Long cardId) {
        this.cardId = cardId;
    }

    @Basic
    @Column(name = "card_no", nullable = false, length = 20)
    public String getCardNo() {
        return cardNo;
    }

    public void setCardNo(String cardNo) {
        this.cardNo = cardNo;
    }

    @Basic
    @Column(name = "card_type", nullable = true, length = 20)
    public String getCardType() {
        return cardType;
    }

    public void setCardType(String cardType) {
        this.cardType = cardType;
    }

    @Basic
    @Column(name = "card_level", nullable = true, length = 20)
    public String getCardLevel() {
        return cardLevel;
    }

    public void setCardLevel(String cardLevel) {
        this.cardLevel = cardLevel;
    }

    @Basic
    @Column(name = "sta", nullable = true, length = 20)
    public String getSta() {
        return sta;
    }

    public void setSta(String sta) {
        this.sta = sta;
    }

    @Basic
    @Column(name = "name", nullable = true, length = 20)
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Basic
    @Column(name = "sex", nullable = true, length = 2)
    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    @Basic
    @Column(name = "mobile", nullable = true, length = 20)
    public String getMobile() {
        return mobile;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    @Basic
    @Column(name = "birth", nullable = true, length = 20)
    public String getBirth() {
        return birth;
    }

    public void setBirth(String birth) {
        this.birth = birth;
    }

    @Basic
    @Column(name = "id_type", nullable = true, length = 20)
    public String getIdType() {
        return idType;
    }

    public void setIdType(String idType) {
        this.idType = idType;
    }

    @Basic
    @Column(name = "id_no", nullable = true, length = 20)
    public String getIdNo() {
        return idNo;
    }

    public void setIdNo(String idNo) {
        this.idNo = idNo;
    }

    @Basic
    @Column(name = "phone", nullable = true, length = 20)
    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    @Basic
    @Column(name = "email", nullable = true, length = 255)
    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    @Basic
    @Column(name = "Street", nullable = true, length = 255)
    public String getStreet() {
        return street;
    }

    public void setStreet(String street) {
        this.street = street;
    }

    @Basic
    @Column(name = "rateCode", nullable = true, length = 20)
    public String getRateCode() {
        return rateCode;
    }

    public void setRateCode(String rateCode) {
        this.rateCode = rateCode;
    }

    @Basic
    @Column(name = "salesCode", nullable = true, length = 20)
    public String getSalesCode() {
        return salesCode;
    }

    public void setSalesCode(String salesCode) {
        this.salesCode = salesCode;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        L2RIpms2Member that = (L2RIpms2Member) o;

        if (memberId != that.memberId) return false;
        if (cardId != that.cardId) return false;
        if (hotelGroupId != null ? !hotelGroupId.equals(that.hotelGroupId) : that.hotelGroupId != null) return false;
        if (hotelId != null ? !hotelId.equals(that.hotelId) : that.hotelId != null) return false;
        if (l2RMemberNo != null ? !l2RMemberNo.equals(that.l2RMemberNo) : that.l2RMemberNo != null) return false;
        if (cardNo != null ? !cardNo.equals(that.cardNo) : that.cardNo != null) return false;
        if (cardType != null ? !cardType.equals(that.cardType) : that.cardType != null) return false;
        if (cardLevel != null ? !cardLevel.equals(that.cardLevel) : that.cardLevel != null) return false;
        if (sta != null ? !sta.equals(that.sta) : that.sta != null) return false;
        if (name != null ? !name.equals(that.name) : that.name != null) return false;
        if (sex != null ? !sex.equals(that.sex) : that.sex != null) return false;
        if (mobile != null ? !mobile.equals(that.mobile) : that.mobile != null) return false;
        if (birth != null ? !birth.equals(that.birth) : that.birth != null) return false;
        if (idType != null ? !idType.equals(that.idType) : that.idType != null) return false;
        if (idNo != null ? !idNo.equals(that.idNo) : that.idNo != null) return false;
        if (phone != null ? !phone.equals(that.phone) : that.phone != null) return false;
        if (email != null ? !email.equals(that.email) : that.email != null) return false;
        if (street != null ? !street.equals(that.street) : that.street != null) return false;
        if (rateCode != null ? !rateCode.equals(that.rateCode) : that.rateCode != null) return false;
        if (salesCode != null ? !salesCode.equals(that.salesCode) : that.salesCode != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = hotelGroupId != null ? hotelGroupId.hashCode() : 0;
        result = 31 * result + (hotelId != null ? hotelId.hashCode() : 0);
        result = 31 * result + (l2RMemberNo != null ? l2RMemberNo.hashCode() : 0);
        result = 31 * result + (int) (memberId ^ (memberId >>> 32));
        result = 31 * result + (int) (cardId ^ (cardId >>> 32));
        result = 31 * result + (cardNo != null ? cardNo.hashCode() : 0);
        result = 31 * result + (cardType != null ? cardType.hashCode() : 0);
        result = 31 * result + (cardLevel != null ? cardLevel.hashCode() : 0);
        result = 31 * result + (sta != null ? sta.hashCode() : 0);
        result = 31 * result + (name != null ? name.hashCode() : 0);
        result = 31 * result + (sex != null ? sex.hashCode() : 0);
        result = 31 * result + (mobile != null ? mobile.hashCode() : 0);
        result = 31 * result + (birth != null ? birth.hashCode() : 0);
        result = 31 * result + (idType != null ? idType.hashCode() : 0);
        result = 31 * result + (idNo != null ? idNo.hashCode() : 0);
        result = 31 * result + (phone != null ? phone.hashCode() : 0);
        result = 31 * result + (email != null ? email.hashCode() : 0);
        result = 31 * result + (street != null ? street.hashCode() : 0);
        result = 31 * result + (rateCode != null ? rateCode.hashCode() : 0);
        result = 31 * result + (salesCode != null ? salesCode.hashCode() : 0);
        return result;
    }
}
